from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get("http://192.168.124.48/index.php/Home/user/login.html")
driver.maximize_window()
driver.implicitly_wait(5)
#登陆TPshop商城前台
driver.find_element(By.NAME,"username").send_keys("123456@qq.com")
driver.find_element(By.NAME,"password").send_keys("s123456")
driver.find_element(By.NAME,"verify_code").send_keys("8888")
driver.find_element(By.NAME,"sbtbutton").click()

#点击我的优惠券
driver.find_element_by_xpath('/html/body/div[3]/div/div[2]/div[1]/div/ul[2]/li[2]/a').click()
#点击领取更多优惠券
driver.find_element_by_xpath('/html/body/div[3]/div/div[2]/div[2]/div[1]/div/div/div/span/a').click()
#点击我的订单
driver.find_element_by_xpath('/html/body/div[1]/div/div/ul/li[1]/a').click()




